package com.ruoyi.table.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.table.domain.ResponseEntity;
import com.ruoyi.table.service.FamilyService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 韩国伟
 * @version 1.0
 * @description: 审核
 * @date 2023/2/23 16:28
 */
@RestController
@RequestMapping("/audit")
public class AutidController {

    @Resource
    private FamilyService familyService;

    //列表
    @GetMapping("/list")
    public ResponseEntity list(){
        return new ResponseEntity(familyService.list());
    }

    //审核通过
    @RequestMapping("/pass")
    public ResponseEntity pass(@RequestParam Integer id){
        return familyService.pass(id);
    }

    //审核驳回
    @PostMapping("/reject")
    public ResponseEntity reject(@RequestParam Integer id){
        return familyService.reject(id);
    }

    //权限列表
    @GetMapping("/middle")
    public ResponseEntity MiddleList(){
        return familyService.MiddleList();
    }

}
